//package com.kungfuhacking.wristbandpro.find.activity;
//
//import android.os.Bundle;
//import android.support.v7.widget.DefaultItemAnimator;
//import android.support.v7.widget.LinearLayoutManager;
//import android.support.v7.widget.RecyclerView;
//import android.view.View;
//import android.widget.TextView;
//
//import com.kungfuhacking.wristbandpro.R;
//import com.kungfuhacking.wristbandpro.base.view.BaseActivity;
//import com.kungfuhacking.wristbandpro.custom.TitleBarView;
//import com.kungfuhacking.wristbandpro.find.bean.ListEntity;
//import com.kungfuhacking.wristbandpro.find.presenter.ILogisticsPresenter;
//import com.kungfuhacking.wristbandpro.find.presenter.LogisticsAdapter;
//import com.kungfuhacking.wristbandpro.find.view.ILogisticsView;
//import com.kungfuhacking.wristbandpro.widget.swipe.DividerItemDecoration;
//
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * 新开卡 物流信息
// * Created by Aaron on 17/5/11.
// */
//
//public class LogisticsActivity extends BaseActivity implements ILogisticsView {
//
//    private android.widget.TextView tvsign;
//    private android.widget.TextView tvfrom;
//    private android.widget.TextView tvnum;
//    private android.widget.TextView tvtel;
//    private android.support.v7.widget.RecyclerView recycleView;
//    private ILogisticsPresenter iLogisticsPresenter = new ILogisticsPresenter(this);
//    private String tradeNo;
//    private List<ListEntity> listEntities = new ArrayList<>();
//    private LogisticsAdapter logisticsAdapter;
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//
//        setContentView(R.layout.activity_logistics);
//
//        if (bundle != null)
//            tradeNo = bundle.getString("tradeNo");
//
//        initWidget();
//        iLogisticsPresenter.getLogisticsInfo(tradeNo);
//
//    }
//
//    private void initWidget() {
//
//        this.recycleView = (RecyclerView) findViewById(R.id.recycleView);
//        this.tvtel = (TextView) findViewById(R.id.tv_tel);
//        this.tvnum = (TextView) findViewById(R.id.tv_num);
//        this.tvfrom = (TextView) findViewById(R.id.tv_from);
//        this.tvsign = (TextView) findViewById(R.id.tv_sign);
//
//        TitleBarView tbv = (TitleBarView) findViewById(R.id.tbv);
//        tbv.setOnLeftClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                finish();
//            }
//        });
//
//        initRecycleView();
//    }
//
//    private void initRecycleView() {
//
//        recycleView.setLayoutManager(new LinearLayoutManager(this));
//        recycleView.setItemAnimator(new DefaultItemAnimator());
//        logisticsAdapter = new LogisticsAdapter(this, listEntities);
//        recycleView.setAdapter(logisticsAdapter);
//        recycleView.addItemDecoration(new DividerItemDecoration(this,
//                DividerItemDecoration.VERTICAL_LIST,
//                getResources().getDrawable(R.color.bg_gray)));
//    }
//
//
//    @Override
//    protected void onDestroy() {
//        super.onDestroy();
//        iLogisticsPresenter.clearRequest();
//    }
//
//    @Override
//    public void setStatus(String status) {
//        tvsign.setText(status);
//    }
//
//    @Override
//    public void setCompany(String company) {
//        tvfrom.setText(company);
//    }
//
//    /**
//     * 快递单号
//     * @param code
//     */
//    @Override
//    public void setCode(String code) {
//        tvnum.setText(code);
//    }
//
//    /**
//     * 快递公司电话
//     * @param num
//     */
//    @Override
//    public void setNum(String num) {
//        tvtel.setText(num);
//    }
//
//    @Override
//    public void setAdapterInfo(List<ListEntity> listEntities) {
//        if (listEntities == null) {
//            showErr("未查询到信息");
//            return;
//        }
//
//        this.listEntities = listEntities;
//        logisticsAdapter.setListEntities(listEntities);
//        logisticsAdapter.notifyDataSetChanged();
//    }
//}
